package com.gitee.chippyer.logger.repository.converter;

import com.gitee.chippyer.logger.engine.bo.LogEntryBO;
import com.gitee.chippyer.logger.engine.bo.TraceEntryBO;
import com.gitee.chippyer.logger.repository.ability.po.LogEntry;
import com.gitee.chippyer.logger.repository.ability.po.TraceEntry;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 审批模板Service转换器
 *
 * @author: chippy
 **/
@Mapper
public interface LogRepositoryConverter {

    LogRepositoryConverter INSTANCE = Mappers.getMapper(LogRepositoryConverter.class);

    @Mapping(target = "createTime", ignore = true)
    LogEntry toLogEntry(LogEntryBO logEntry);

    @Mapping(target = "createTime", ignore = true)
    LogEntryBO toLogEntryBO(LogEntry logEntry);

    @Mapping(target = "createTime", ignore = true)
    TraceEntry toTraceEntry(TraceEntryBO traceEntryBO);

    @Mapping(target = "createTime", ignore = true)
    TraceEntryBO toTraceEntryBO(TraceEntry traceEntry);

}
